package javango.forms.fields;

import java.util.Map;

public interface ChoiceField extends Field {
	
	/**
	 * Return a map of all available choices
	 * @return
	 */
	public Map<String, Object> getChoices();
	
	/**
	 * Set the map of available choices
	 * @param choices
	 * @return
	 */
	public ChoiceField setChoices(Map<String, Object> choices);
	
	/**
	 * Return the total number of choices that will be returned by a call to getChoices,  example usage would be a widget
	 * that changes based on the number of choices (ie don't want to return 10k choices from a database.)
	 * @return
	 */
	public long getChoiceCount();
}
